package com.project.platform.mapper;

import com.project.platform.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.project.platform.entity.Shop;
import java.util.List;
import java.util.Map;

public interface ShopMapper {

    List<Shop> queryPage(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize, @Param("query") Map<String, Object> query);

    int queryCount(@Param("query") Map<String, Object> query);

    @Select("SELECT * FROM shop")
    List<Shop> list();

    @Select("select * from shop where username = #{username}")
        //@Select("SELECT * FROM user WHERE username LIKE CONCAT('%',#{username},'%') ")
    Shop selectByUsername(String username);

    @Select("SELECT * FROM shop WHERE id = #{id}")
    Shop selectById(Integer id);

    @Select("select * from shop where tel = #{tel}")
    Shop SelbyTelphone(String tel);


    int insert(Shop shop);

    int update(Shop shop);

    boolean delete(List<Integer> ids);
}

